package com.ruoyi.finance.service;

import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.finance.domain.CommissionDeliveryProduct;
import com.ruoyi.finance.domain.CommissionSalesData;
import com.ruoyi.finance.vo.AssistantCommissionInfo;

import java.util.Date;
import java.util.List;

/**
 * 销售出(退)库单Service接口
 *
 * @author admin
 * @date 2023-10-13
 */
public interface ICommissionDeliveryProductService {
    /**
     * 查询销售出(退)库单
     *
     * @param id 销售出(退)库单ID
     * @return 销售出(退)库单
     */
    public CommissionDeliveryProduct selectCommissionDeliveryProductById(Long id);

    /**
     * 查询销售出(退)库单列表
     *
     * @param commissionDeliveryProduct 销售出(退)库单
     * @return 销售出(退)库单集合
     */
    public List<CommissionDeliveryProduct> selectCommissionDeliveryProductList(CommissionDeliveryProduct commissionDeliveryProduct);

    /**
     * 新增销售出(退)库单
     *
     * @param commissionDeliveryProduct 销售出(退)库单
     * @return 结果
     */
    public int insertCommissionDeliveryProduct(CommissionDeliveryProduct commissionDeliveryProduct);

    /**
     * 修改销售出(退)库单
     *
     * @param commissionDeliveryProduct 销售出(退)库单
     * @return 结果
     */
    public int updateCommissionDeliveryProduct(CommissionDeliveryProduct commissionDeliveryProduct);

    int updateCommissionDeliveryProduct(List<CommissionDeliveryProduct> list);

    /**
     * 批量删除销售出(退)库单
     *
     * @param ids 需要删除的销售出(退)库单ID
     * @return 结果
     */
    public int deleteCommissionDeliveryProductByIds(Long[] ids);

    /**
     * 删除销售出(退)库单信息
     *
     * @param id 销售出(退)库单ID
     * @return 结果
     */
    public int deleteCommissionDeliveryProductById(Long id);

    List<CommissionSalesData> getCommissionDataByDate(Date date);

    List<String> getSalesNameByType(List<String> piNoList, Integer type);

    List<AssistantCommissionInfo> getAssistantCommissionInfo(List<String> piNoList);

    void syncProduct(Date commissionDate);

    void importProduct(MultipartFile file, Date date);
}
